//
//  MyearningRankCell.m
//  DaiShengInvest
//
//  Created by 张睿 on 2017/7/5.
//  Copyright © 2017年 davinci. All rights reserved.
//

#import "MyearningRankCell.h"

@implementation MyearningRankCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self setupUI];
    }
    
    return self;
}


- (void)setupUI{
    
    self.backgroundColor = [UIColor clearColor];
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    
    self.nameLabel = [UILabel new];
    
    self.nameLabel.font = [UIFont fontWithName:@"PingFangSC-Regular" size:15 * SCREENH6];
    self.nameLabel.textColor = ColorWithRGB(0xe7e7e7);
    self.nameLabel.textAlignment = NSTextAlignmentLeft;
    
    [self addSubview:self.nameLabel];
    
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.mas_equalTo(self).offset(15 * SCREENH6);
        make.centerY.mas_equalTo(self);
    }];
    
    
    self.moneyLabel = [UILabel new];
    
    self.moneyLabel.font = [UIFont fontWithName:@"PingFangSC-Regular" size:16 * SCREENH6];
    self.moneyLabel.textColor = ColorWithRGB(0xfd5c51);
    self.moneyLabel.textAlignment = NSTextAlignmentRight;
    
    [self addSubview:self.moneyLabel];
    
    [self.moneyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self);
        make.trailing.mas_equalTo(self).offset(-15 * SCREENH6);
    }];
    
    self.lineView = [UIView new];
    
    self.lineView.backgroundColor = [UIColor whiteColor];
    self.lineView.alpha = 0.1;
    
    [self addSubview:self.lineView];
    
    
    [self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.trailing.bottom.mas_equalTo(self);
        make.height.mas_equalTo(1 * SCREENH6);
    }];
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
